Skip to content

Dont re-pin total_seconds as it is already implemented #17432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2017

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@codecov
Copy link

codecov bot commented Sep 4, 2017

Codecov Report

Merging #17432 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17432      +/-   ##
==========================================
- Coverage   91.15%   91.14%   -0.02%     
==========================================
  Files         163      163              
  Lines       49581    49581              
==========================================
- Hits        45198    45190       -8     
- Misses       4383     4391       +8
Flag Coverage Δ
#multiple 88.92% <ø> (ø) ⬆️
#single 40.25% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.72% <0%> (-0.1%) ⬇️
pandas/core/indexes/datetimes.py 95.43% <0%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1981b67...4d7f6f2. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 4, 2017

Codecov Report

Merging #17432 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17432      +/-   ##
==========================================
- Coverage   91.15%   91.14%   -0.02%     
==========================================
  Files         163      163              
  Lines       49581    49581              
==========================================
- Hits        45198    45190       -8     
- Misses       4383     4391       +8
Flag Coverage Δ
#multiple 88.92% <ø> (ø) ⬆️
#single 40.25% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.72% <0%> (-0.1%) ⬇️
pandas/core/indexes/datetimes.py 95.43% <0%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1981b67...4d7f6f2. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 4, 2017

Codecov Report

Merging #17432 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17432      +/-   ##
==========================================
- Coverage   91.15%   91.14%   -0.02%     
==========================================
  Files         163      163              
  Lines       49587    49587              
==========================================
- Hits        45203    45194       -9     
- Misses       4384     4393       +9
Flag Coverage Δ
#multiple 88.92% <ø> (ø) ⬆️
#single 40.26% <ø> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.72% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d457791...1a029c3. Read the comment docs.

@gfyoung gfyoung added Clean Internals Related to non-user accessible pandas implementation labels Sep 4, 2017
@@ -3892,8 +3892,9 @@ for field in fields:
_nat_methods = ['date', 'now', 'replace', 'to_pydatetime',
'today', 'round', 'floor', 'ceil', 'tz_convert',
'tz_localize']
_nan_methods = ['weekday', 'isoweekday', 'total_seconds']
_implemented_methods = ['to_datetime', 'to_datetime64', 'isoformat']
_nan_methods = ['weekday', 'isoweekday']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blows away the doc-string. So I would rather leave this as-is and simply remove the total_seconds method from NaT class; accomplishing the same thing more in-line with current code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I defaulted to leaving the def total_seconds in place because it had a GH issue attached to it. Can change, or can just pin on the correct docstring up where the method is defined.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comments, its would be faster just to make the change.

@@ -3892,8 +3892,9 @@ for field in fields:
_nat_methods = ['date', 'now', 'replace', 'to_pydatetime',
'today', 'round', 'floor', 'ceil', 'tz_convert',
'tz_localize']
_nan_methods = ['weekday', 'isoweekday', 'total_seconds']
_implemented_methods = ['to_datetime', 'to_datetime64', 'isoformat']
_nan_methods = ['weekday', 'isoweekday']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comments, its would be faster just to make the change.

@jbrockmendel
Copy link
Member Author

Just pushed commit to follow your suggestion.

@jbrockmendel
Copy link
Member Author

Nope, turns out defining total_seconds via the _make_error_func func fails because total_seconds is not already a NaTType method.

@jreback jreback added this to the 0.21.0 milestone Sep 7, 2017
@jreback jreback merged commit b869446 into pandas-dev:master Sep 7, 2017
@jreback
Copy link
Contributor

jreback commented Sep 7, 2017

thanks

jbrockmendel added a commit to jbrockmendel/pandas that referenced this pull request Sep 10, 2017
@jbrockmendel jbrockmendel deleted the dedup_total_seconds branch October 30, 2017 16:23
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants